CREATE TABLE `SRTrade`.`MsgSRStrategyReportLegX` (
`strategyNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'strategy order number',
`legId` BIGINT NOT NULL DEFAULT 0,
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR trading account',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'leg Security',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'leg Security',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'leg Security',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg Security',
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg Security',
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg Security',
`secKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'leg Security',
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'leg Security',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`orderSize` INT NOT NULL DEFAULT 0 COMMENT 'order size (strategy.orderSize * mult)',
`mult` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'leg ratio',
`side` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`posType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None',
`exchMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'eligible exchanges (0 = all)',
`legPriority` ENUM('None','Lead') NOT NULL DEFAULT 'None',
`minUBid` DOUBLE NOT NULL DEFAULT 0 COMMENT '[optional] (<= 0 is any) (leg limit is only valid if all uMkt prices are between [minUBid, maxUAsk])',
`maxUAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT '[optional] (<= 0 is any)',
`minMaxType` ENUM('None','Prc','Pct') NOT NULL DEFAULT 'None' COMMENT 'if Prc minUBid/maxUAsk are expressed as prices; if Pct then they are expresses as pct change since parent order arrival',
`refUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price (PrcDe orders)',
`refDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'reference delta (for PrcDe order handling)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`strategyNumber`,`legId`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';